add foldl/map Monoid Homomorphisms#1308
Merged
Merged
Conversation
foldl is a monoid homomorphism from List A to any monoid on A
mortberg
requested changes
May 18, 2026
Collaborator
mortberg
left a comment
There was a problem hiding this comment.
Thanks a lot. I have a few small comments before this can be merged
| MonoidStr.isMonoid (snd (ListMonoid (_ , pf))) = makeIsMonoid (isOfHLevelList 0 pf) | ||
| (λ x y z → sym (++-assoc x y z)) ++-unit-r (λ _ → refl) | ||
|
|
||
| foldlMonHom : (M : Monoid ℓ-zero) → MonoidHom (ListMonoid (fst M , MonoidStr.is-set (snd M))) M |
Collaborator
There was a problem hiding this comment.
Why is this only for level zero? Can't it be universe polymorphic?
Collaborator
There was a problem hiding this comment.
Also, why decompose M? Shouldn't ListMonoid M work?
Contributor
Author
There was a problem hiding this comment.
Made it universe polymorphic :). I dont think ListMonoid M works because I only need fact that it's a set from the structure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
foldl is a monoid homomorphism from List A to any monoid on A